import { useContext } from 'react';
import {useSbuscribe} from './store'

export default function Counter04() {
  const [counter, setCounter] = useSbuscribe({
    path: 'demo05p/Counter04',
    key: 'counter04',
    value: 0
  })

  console.log('counter04: ', counter)

  function clickHandle() {
    setCounter(counter + 1)
  }
  return (
    <button onClick={clickHandle}>
      counter04: {counter}
    </button>
  )
}